bitkeeper revision 1.341 (3f1120a2WW6KGE81TArq_p654xy38Q)
authoriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Sun, 13 Jul 2003 09:04:34 +0000 (09:04 +0000)
committeriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Sun, 13 Jul 2003 09:04:34 +0000 (09:04 +0000)
Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into labyrinth.cl.cam.ac.uk:/auto/anfs/scratch/labyrinth/iap10/xeno-clone/xeno.bk

1  2 
.rootkeys
xen/common/domain.c
xenolinux-2.4.21-sparse/arch/xeno/mm/ioremap.c
xenolinux-2.4.21-sparse/mkbuildtree

diff --cc .rootkeys
Simple merge
Simple merge
index b15b8fc3cba09f82a6574e7f1c0c9f6dad39638f,db0221d2dda975a5a68da7455d428dd6dc6d23c6..3e060ed5df87151fe0b8c5275b4a00062c942999
@@@ -263,87 -165,16 +165,64 @@@ void * __ioremap(unsigned long machine_
          return NULL;
      }
      return (void *) (offset + (char *)addr);
+ #else
+     return NULL;
+ #endif
  }
  
- /*
-  * 'vfree' is basically inlined here. This is because we use a different
-  * function to zap the associated page range.
-  */
  void iounmap(void *addr)
  {
-     struct vm_struct **p, *tmp;
-     addr = (void *)((unsigned long)addr & PAGE_MASK);
-     
-     if (addr == NULL)
-         return;
-     write_lock(&vmlist_lock);
-     for (p = &vmlist ; (tmp = *p) ; p = &tmp->next) {
-         if (tmp->addr == addr) {
-             *p = tmp->next;
-             direct_zap_page_range(&init_mm, 
-                                   VMALLOC_VMADDR(tmp->addr), 
-                                   tmp->size);
-             write_unlock(&vmlist_lock);
-             kfree(tmp);
-             return;
-         }
-     }
-     write_unlock(&vmlist_lock);
-     printk(KERN_ERR "Trying to iounmap() nonexistent vm area (%p)\n", addr);
+     vfree((void *)((unsigned long)addr & PAGE_MASK));
  }
  
 +void __init *bt_ioremap(unsigned long machine_addr, unsigned long size)
 +{
 +        unsigned long offset, last_addr;
 +        unsigned int nrpages;
 +        enum fixed_addresses idx;
 +
 +        /* Don't allow wraparound or zero size */
 +        last_addr = machine_addr + size - 1;
 +        if (!size || last_addr < machine_addr)
 +                return NULL;
 +
 +        /*
 +         * Mappings have to be page-aligned
 +         */
 +        offset = machine_addr & ~PAGE_MASK;
 +        machine_addr &= PAGE_MASK;
 +        size = PAGE_ALIGN(last_addr) - machine_addr;
 +
 +        /*
 +         * Mappings have to fit in the FIX_BTMAP area.
 +         */
 +        nrpages = size >> PAGE_SHIFT;
 +        if (nrpages > NR_FIX_BTMAPS)
 +                return NULL;
 +
 +        /*
 +         * Ok, go for it..
 +         */
 +        idx = FIX_BTMAP_BEGIN;
 +        while (nrpages > 0) {
 +                set_fixmap(idx, machine_addr);
 +
 +              //unsigned long address = __fix_to_virt(idx);
 +              
 +
 +
 +//direct_set_pte(address, direct_mk_pte_phys(machine_addr, PAGE_KERNEL_NOCACHE));
 +
 +                machine_addr += PAGE_SIZE;
 +                --idx;
 +                --nrpages;
 +        }
 +
 +flush_tlb_all();
 +
 +        return (void*) (offset + fix_to_virt(FIX_BTMAP_BEGIN));
 +}
 +
  
  #if 0 /* We don't support these functions. They shouldn't be required. */
  void __init *bt_ioremap(unsigned long machine_addr, unsigned long size) {}
Simple merge